﻿#ifndef LOGINWIDGET_H
#define LOGINWIDGET_H

#include <QWidget>

namespace Ui {
class LoginWidget;
}

class LoginWidget : public QWidget
{
    Q_OBJECT

public:
    explicit LoginWidget(QWidget *parent = Q_NULLPTR);
    ~LoginWidget();

    QString handle_login_ack(int result, QVariantHash &param);
    void handle_login();
    bool handle_login(const QString &account, const QByteArray &hashedPW);

protected:
    void paintEvent(QPaintEvent *e);
private slots:
    void on_btnLogin_clicked();

    void on_btnCancelLogin_clicked();

    void on_cbb_user_id_editTextChanged(const QString &);

    void on_btn_clear_clicked();

    void slot_cbb_user_id_currentIndexChanged(const QString &arg1);

    void slot_proxy_finished();
private:
    Ui::LoginWidget *ui;

    QString login_id;
    QByteArray hashedPassword;
    const QString placeHolderDisplayPW;
    const QString placeHolderInputPW;
};

#endif // LOGINWIDGET_H
